<?php
/*
 * Created on Sep 13, 2010
 *
 * To change the template for this generated file go to
 * Window - Preferences - PHPeclipse - PHP - Code Templates
 */
 
include_once("./configure/configure.php");		//--> global var
include_once("Smarty.class.php");				//--> out template
include_once("Common.php");
include_once("UploadFiles.php");				//--> UploadFiles
include_once("Strings.php");					//--> String utils
include_once("customerSession.inc.php");
include_once("Session.php");					//-- Session
include_once("orders/Cart.php");					//--> Cart
include_once("orders/CartProduct.php");				//--> Cart
include_once("orders/CartProductAttribute.php");	//--> Cart


$common 	= new Common();
$objStrings = new Strings();

$objCart 	= new Cart();		//--> Cart
$objSession	= new Session(DB_TAG_SYSTEM, SESSION_TABLE_NAME);	//-- session

session_start();

$isLogin	= false;

if($objSession->exist()) {
	$isLogin	= true;
}

if($_SESSION['cart'])
	$objCart = unserialize($_SESSION['cart']);

/*----- out html -----*/
$smarty = new Smarty();	//-- out template
$smarty->template_dir 	= TEMPLATE_DIR;
$smarty->compile_dir  	= COMPILE_DIR;
$smarty->cache_dir  	= CACHE_DIR;

$smarty->caching 		= CACHING;
$smarty->cache_lifetime = CACHE_LIFETIME;

$smarty->assign('HOME_URL', HOME_URL);
$smarty->assign('HOME_URL_HTTP', HOME_URL);

$smarty->assign('objCart', $objCart);
$smarty->assign('objStrings', $objStrings);

if(!$smarty->isCached('about.html')){
	include_once("includeCategory.php");	//--> include category
	include_once("includeSpec.php");		//--> include spec

	$smarty->assign('categorys', $categorys);
	$smarty->assign('topCategory', $topCategory);
	
	$smarty->assign('specProducts', $specProducts);
}

$smarty->assign('isLogin', $isLogin);

$smarty->display('warranty.html');
?>
